package com.icloud.article.boot.controller.app;

import com.icloud.article.boot.service.ArticleSettingsService;
import com.icloud.article.boot.vo.ArticleSettingsVo;
import com.icloud.common.core.api.CommonResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Api(tags = "前台动态设置接口")
@RequestMapping("/app/settings")
@RequiredArgsConstructor
public class ArticleSettingsController {
    private final ArticleSettingsService articleSettingsService;

    @ApiOperation("查询")
    @PostMapping("/query")
    @ResponseBody
    public CommonResult<ArticleSettingsVo> query(){
        return CommonResult.success(articleSettingsService.get());
    }
}
